package it.xiuxian.lib.utils


import android.app.Application
import androidx.annotation.Keep

import com.pangrowth.service_api.media.IMediaService

/**
 * @author zhouhaoyang
 * @since 6/7/21
 */
@Keep

class MediaServiceImpl : IMediaService {
    companion object {
        val instance = MediaServiceImpl()
    }
    override fun init(application: Application){
        //若集成了积分闭环，且未集成直播
        if (RuntimeUtils.containsLuckyCat() && !RuntimeUtils.containsLiveSdk()) {
            return
        }
        //未集成积分闭环，需要手动初始化流媒体sdk
        MediaInitHelper.init(application)
    }

    override fun isDPInited(): Boolean{
        return MediaInitHelper.isDPInited
    }

    override fun hasDpSDK(): Boolean{
        return true
    }

/*    override fun getDrawFragment(): Fragment {
        return DrawFragment.newInstance()
    }
    override fun openMediaAllInOneActivity(context: Context) {
        val intent = Intent(context, MediaAllInOneActivity::class.java)
        context.startActivity(intent)
    }

    override fun openMediaDrawFullScreenActivity(context: Context) {
        val intent = Intent(
            context, DrawVideoFullScreenActivity::class.java
        )
        context.startActivity(intent)
    }*/

}